package com.hoshiibuy.sys.permission.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.sun.istack.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 权限
 * </p>
 *
 * @author Mr.Wu
 * @since 2019-04-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysPermissiones对象", description = "权限")
@TableName("sys_permissiones")
public class SysPermissiones extends Model<SysPermissiones> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id", hidden = true)
	@TableId(value = "id")
	private Long id;

	@ApiModelProperty(value = "所属系统")
	@NotNull
	private Long systemId;

	@ApiModelProperty(value = "所属上级")
	@NotNull
	private Long pid;

	@ApiModelProperty(value = "名称")
	private String name;

	@ApiModelProperty(value = "类型(1:目录,2:菜单,3:按钮)")
	private Integer type;

	@ApiModelProperty(value = "权限值")
	private String permissionValue;

	@ApiModelProperty(value = "路径")
	private String uri;

	@ApiModelProperty(value = "图标")
	private String icon;

	@ApiModelProperty(value = "状态(0:禁止,1:正常)")
	@NotNull
	private Integer status;

	@ApiModelProperty(value = "排序")
	@NotNull
	private Long orders;

	@ApiModelProperty(value = "创建时间", hidden = true)
	private LocalDateTime addTime;

	@ApiModelProperty(value = "更新时间", hidden = true)
	private LocalDateTime updateTime;

	@ApiModelProperty(value = "版本号", hidden = true)
	private Integer version;

	@ApiModelProperty(value = "建立人")
	private String createdby;

	@ApiModelProperty(value = "修改人")
	private String modifiedby;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getSystemId() {
		return systemId;
	}

	public void setSystemId(Long systemId) {
		this.systemId = systemId;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getPermissionValue() {
		return permissionValue;
	}

	public void setPermissionValue(String permissionValue) {
		this.permissionValue = permissionValue;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Long getOrders() {
		return orders;
	}

	public void setOrders(Long orders) {
		this.orders = orders;
	}

	public LocalDateTime getAddTime() {
		return addTime;
	}

	public void setAddTime(LocalDateTime addTime) {
		this.addTime = addTime;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getCreatedby() {
		return createdby;
	}

	public void setCreatedby(String createdby) {
		this.createdby = createdby;
	}

	public String getModifiedby() {
		return modifiedby;
	}

	public void setModifiedby(String modifiedby) {
		this.modifiedby = modifiedby;
	}

}
